package com.ruoyi.garbage.miniapp;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.garbage.service.IChallengeResultService;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("/miniApp")
public class ChallengeController {

    @Resource
    private IChallengeResultService challengeResultService;

    @PostMapping("/challenge")
    @ApiOperation(value = "处理挑战赛的结果")
    public AjaxResult challengeResults(@RequestBody Map<String, Object> map) {
        return challengeResultService.challengeResults(map);
    }
}
